//
//  UIColor+LLAdd.m
//  TaoTuo
//
//  Created by admin on 2019/9/27.
//  Copyright © 2019 admin. All rights reserved.
//

#import "UIColor+LLAdd.h"


@implementation UIColor (LLAdd)

+ (UIColor *)colorWithLightColor:(UIColor *)lightColor darkColor:(UIColor *)darkColor
{
    if (@available(iOS 13.0, *)) {
        return [UIColor colorWithDynamicProvider:^UIColor * _Nonnull(UITraitCollection * _Nonnull traitCollection) {
            if ([traitCollection userInterfaceStyle] == UIUserInterfaceStyleDark) {
                return darkColor;
            } else {
                return lightColor;
            }
        }];
    }
    
    return lightColor;
}

@end
